package com.yanqu.road.entity.activity.xiuxian.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * pvp结束记录
 */
@FieldTypeAnnotation(tableName = "t_c_xiuxian_pvp_end_record")
public class CrossXiuXianPvpEndRecord extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "轮次")
    private int round;

    @FieldTypeAnnotation(desc = "本轮斗法最佳抢点王")
    private CrossXiuXianPvpBestBattleRecord bestSeizeUser = new CrossXiuXianPvpBestBattleRecord();

    @FieldTypeAnnotation(desc = "本轮斗法最佳击杀王")
    private CrossXiuXianPvpBestBattleRecord bestKillUser = new CrossXiuXianPvpBestBattleRecord();

    @FieldTypeAnnotation(desc = "宗门最佳抢点王")
    private Map<Integer, CrossXiuXianPvpBestBattleRecord> campBestSeizeUserMap = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "宗门最佳击杀王")
    private Map<Integer, CrossXiuXianPvpBestBattleRecord> campBestKillUserMap = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "结束时间")
    private long endTime;


    public CrossXiuXianPvpEndRecord() {

    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setOp(DataStatus.Update);
        }
    }

    public CrossXiuXianPvpBestBattleRecord getBestSeizeUser() {
        return bestSeizeUser;
    }

    public void setBestSeizeUser(CrossXiuXianPvpBestBattleRecord bestSeizeUser) {
        if (bestSeizeUser == null) {
            return;
        }
        this.bestSeizeUser = bestSeizeUser;
        setOp(DataStatus.Update);
    }

    public CrossXiuXianPvpBestBattleRecord getBestKillUser() {
        return bestKillUser;
    }

    public void setBestKillUser(CrossXiuXianPvpBestBattleRecord bestKillUser) {
        if (bestKillUser == null) {
            return;
        }
        this.bestKillUser = bestKillUser;
        setOp(DataStatus.Update);
    }

    public Map<Integer, CrossXiuXianPvpBestBattleRecord> getCampBestSeizeUserMap() {
        return campBestSeizeUserMap;
    }

    public void setCampBestSeizeUserMap(Map<Integer, CrossXiuXianPvpBestBattleRecord> campBestSeizeUserMap) {
        if (campBestSeizeUserMap == null) {
            return;
        }
        this.campBestSeizeUserMap = campBestSeizeUserMap;
        setOp(DataStatus.Update);
    }

    public Map<Integer, CrossXiuXianPvpBestBattleRecord> getCampBestKillUserMap() {
        return campBestKillUserMap;
    }

    public void setCampBestKillUserMap(Map<Integer, CrossXiuXianPvpBestBattleRecord> campBestKillUserMap) {
        if (campBestKillUserMap == null) {
            return;
        }
        this.campBestKillUserMap = campBestKillUserMap;
        setOp(DataStatus.Update);
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        if (this.endTime != endTime) {
            this.endTime = endTime;
            setOp(DataStatus.Update);
        }
    }
}
